<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AppendIdentityPhotoToDriverOthersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('driver_others', function (Blueprint $table) {
            //
            $table->json('identity_photo')->nullable()->comment('身份证照片');
            $table->json('licence_photo')->nullable()->comment('驾照照片');
            $table->integer('licence_id')->nullable()->comment('驾照类型');
            $table->integer('city')->comment('接单城市');
            $table->integer('auditor_id')->comment('审核人ID');
            $table->dateTime('audit_time')->nullable()->comment('审核时间');

        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('driver_others', function (Blueprint $table) {
            //
            $table->dropColumn(['identity_photo','licence_photo','licence_id','city','auditor_id','audit_time']);
        });
    }
}
